package com.borrow.mapper;

import com.commons.entity.Borrow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BorrowMapper {

    @Select("select * from borrow where sid=#{sid}")
    List<Borrow> findBorrowBySid(Integer sid);

    @Select("select * from borrow where bid=#{bid}")
    List<Borrow> findBorrowByBid(Integer bid);

    @Select("select * from borrow where bid = #{bid} and sid = #{sid}")
    Borrow getBorrow(int sid, int bid);

}
